<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Admin/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<FiltronASP.Areas.Admin.ViewModels.Users.UserPermissionsEditionViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edycja uprawnień użytkownika 
	<% if (Model != null) { %>
	    <% if (Model.UserToOperateWith != null) { %>
	        (<%= String.Format("{0} {1}", 
	             Model.UserToOperateWith.user_first_name,
                 Model.UserToOperateWith.user_last_name) %>)
        <% }    //if  %>                 
    <% }    //if  %>                         
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <% Html.BeginForm("SubmitUserPermissions", "Users", FormMethod.Post, new {name = "userPermissionsForm" }); %>
        <% Html.RenderPartial("UserPermissionsEditionFields"); %>
        <div class="right-page-buttons">
		    <span class="button2" onclick="history.back();">Anuluj</span>
			<span class="button2" onclick="submitPrepared(document.forms['userPermissionsForm']);">Zapisz</span> 
        </div>
    <% Html.EndForm(); %>
    <% if (Model != null) { %>
        <% if (Model.AvailableLanguages != null) { %>
            <% foreach (var languageCheckBox in Model.AvailableLanguages) { %>
		        <script type="text/javascript">
		            showHideItemOnCheckboxId('parentFormContLang<%= languageCheckBox.language_abbr %>', 'formContLang<%= languageCheckBox.language_abbr %>')
                </script>									                    
            <% } %>                                   
        <% } %>                                   
    <% } %>                                           
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
	Edycja uprawnień użytkownika 
	<% if (Model != null) { %>
	    <% if (Model.UserToOperateWith != null) { %>
	        (<%= String.Format("{0} {1}", 
	             Model.UserToOperateWith.user_first_name,
                 Model.UserToOperateWith.user_last_name) %>)
        <% }    //if  %>                 
    <% }    //if  %>                         
</asp:Content>
